<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="java.util.List" %>
    <%@ page import="java.util.HashMap" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<% int totCnt = Integer.parseInt(request.getAttribute("totCnt").toString()==null ?"0":request.getAttribute("totCnt").toString()); %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>WillThink 자유게시판 - 리스트</title>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
</head>
<script type="text/javascript">
</script>
<body>
<c:set var="totCnt" value="<%=totCnt%>"></c:set>
<div id="header">
	<div>
	<h3>자유게시판 리스트</h3>
	</div>
</div>
<div id="content" >
	<div id="listCount">   총 ${totCnt} 개의 게시물이 있습니다.</div>
	
	
	<div  id="tableTitle">
				<ul>
					<li>번호</li>
					<li>제목</li>
					<li>작성자</li>
					<li>작성일</li>
					<li>Count</li>
				</ul>
		</div>
	<div id="tableContent">
		<c:if test="${totCnt ==0}">
		<div id="tableZero"> 게시물이 존재 하지 않습니다.</div>
		</c:if>
		<c:if test="${totCnt >0}">
			<div id="tableList">
				<c:forEach var="resultList" items="${resultList}">
						<ul>
							<li>${resultList.SEQ_NO}</li>
							<li>${resultList.TITLE}</li>
							<li>${resultList.WRITER}</li>
							<li>${resultList.REG_DATE}</li>
							<li>${resultList.COUNTER}</li>
						</ul>
				</c:forEach>
			</div>
		</c:if>
	</div>
	<div id="paging">${pageNavigation}</div>
	
</div>

</body>
</html>